package com.adopapa.rabbitdemo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

/**
 * Hello world!
 *
 */
@SpringBootApplication
@EnableScheduling
public class App {
	
	@Autowired
	private HelloSender sender;
	
	public static void main(String[] args) {
		System.out.println("Hello World!");
		SpringApplication.run(App.class, args);
		
		
	}
	
	@Scheduled(fixedDelay = 3000)
	public void send() {
		sender.send();
	}
	
	
	
	
}
